<?php
/**
 * Created by PhpStorm.
 * User: Ason
 * Date: 15-6-3
 * Time: 下午3:46
 */

?>
<ul class="nav sidebar-menu">
	<?php
	foreach( $menu as $m):
	?>
	<!--一级导航-->
	<li>
		<a href="<?=site_url( $m['url'] );?>" class="menu-dropdown">
			<i class="menu-icon fa <?=$m['icon']?>"></i>
			<span class="menu-text"> <?=$m['name']?> </span>
			<?php
			if( $m['sub'] ):
			?>
			<i class="menu-expand"></i>
			<?php
			endif;
			?>
		</a>
		<!--二级导航-->
		<?php
		if( $m[ 'sub' ] ):
		?>
		<ul class="submenu">
			<?php
			foreach( $m[ 'sub' ] as $n ):
			?>
			<li>
				<a href="<?=site_url( $n['url'] )?>">
					<span class="menu-text"><?=$n['name']?></span>
				</a>
			</li>
			<?php
			endforeach;
			?>
		</ul>
			<!--/二级导航-->
		<?php
		endif;
		?>
	</li>
	<!--/一级导航-->
	<?php
	endforeach;
	?>
</ul>
<script>
	
	
	
</script>